import { commonRoutes, shopRoutes, superRoutes } from "../assets/routers";
import { getStorageRole } from "../utils/index";

export const getRouters = () => {
  // 用户角色，普通用户1，店铺管理员2，后台管理员3
  const role = getStorageRole();
  const routers = commonRoutes;
  switch (role) {
    case 2:
      routers.push(...shopRoutes);
      break;
    case 3:
      routers.push(...superRoutes);
      break;
  }
  return routers;
};
